@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake)

set(MUMPS_UPSTREAM_VERSION @MUMPS_UPSTREAM_VERSION@)
set(MUMPS_intsize64 @intsize64@)
set(MUMPS_parallel @MUMPS_parallel@)
set(MUMPS_LAPACK_VENDOR @LAPACK_VENDOR@)
set(MUMPS_SCALAPACK_VENDOR @SCALAPACK_VENDOR@)

set(MUMPS_s_FOUND @BUILD_SINGLE@)
set(MUMPS_d_FOUND @BUILD_DOUBLE@)
set(MUMPS_c_FOUND @BUILD_COMPLEX@)
set(MUMPS_z_FOUND @BUILD_COMPLEX16@)

if(MUMPS_parallel)
  find_dependency(MPI COMPONENTS C Fortran)

  if(NOT MUMPS_LAPACK_VENDOR MATCHES "^MKL")
    find_dependency(LAPACK COMPONENTS ${MUMPS_LAPACK_VENDOR})
  endif()

  find_dependency(SCALAPACK COMPONENTS ${MUMPS_SCALAPACK_VENDOR})
else()
  find_dependency(LAPACK COMPONENTS ${MUMPS_LAPACK_VENDOR})
  set(MUMPS_mpiseq_FOUND true)
endif()

set(MUMPS_Scotch_FOUND @scotch@)
if(MUMPS_Scotch_FOUND)
  find_dependency(Scotch COMPONENTS ESMUMPS)
endif()

set(MUMPS_METIS_FOUND @metis@)
if(MUMPS_METIS_FOUND)
  find_dependency(METIS)
endif()

set(MUMPS_OpenMP_FOUND @MUMPS_openmp@)
if(MUMPS_OpenMP_FOUND)
  find_dependency(OpenMP)
endif()

check_required_components(@PROJECT_NAME@)
